<template>
  <div>
    <Sreach />
    <input type="checkbox" v-model="flag" />
    <input
      type="checkbox"
      v-model="value"
      :value="item + 10"
      v-for="item in list"
      :key="item"
    />
    <button @click="fn">点击</button>
    <el-popconfirm @confirm="del" title="确定要删除吗?">
      <template #reference>
        <span>删除</span>
      </template>
    </el-popconfirm>
  </div>
</template>

<script>
import { ref } from "vue";
import Sreach from "../component/Search.vue";
export default {
  setup() {
    const list = ref([6, 7, 8, 9, 5, 4, 3, 2]);
    const value = ref([]);
    const flag = ref(false);
    const fn = () => {
      console.log(value.value);
      console.log(flag.value);
    };
    const del = () => {
      console.log(1);
    };
    return {
      value,
      flag,
      fn,
      list,
      del,
    };
  },
  components: {
    Sreach,
  },
};
</script>

<style lang="less" scoped></style>
